using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Mail;
using System.Net;
using System.Data.Odbc;
namespace CocaCola_Inventory_System.Data_Access
{
    class EMAIL
    {
        public static void sendemail(string TO , string subject , string body,OdbcConnection con)
        {
            MailMessage email = new MailMessage(Common.GetSystemEmail(con), TO, subject, body);

            SmtpClient client = new SmtpClient(Common.GetSystemSMTP(con));

            try
            {
                client.Send(email);
            }
            catch (Exception ex)
            {

                System.Windows.Forms.MessageBox.Show("Failed To Send Notification Email");
            }
        }
    }
}
